//
//  AboutUsViewController.m
//  MeiLiProductModel
//
//  Created by B505 on 15/2/23.
//  Copyright (c) 2015年 孙晓林. All rights reserved.
//

#import "AboutUsViewController.h"
#import "SliderViewController.h"
#import "PublicMethod.h"
#import "T4Marco.h"
#import "UIButton+Utils.h"

@interface AboutUsViewController ()
@property (weak, nonatomic) IBOutlet UINavigationBar *NavBar;
@property (weak, nonatomic) IBOutlet UILabel *deTechLabel;
@property (weak, nonatomic) IBOutlet UILabel *firstContentLabel;
@property (strong, nonatomic) IBOutlet UILabel *contactUsLabel;
@property (weak, nonatomic) IBOutlet UILabel *secondContentLabel;
@property (weak, nonatomic) IBOutlet UIScrollView *scrollView;

@end

@implementation AboutUsViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    _NavBar.titleTextAttributes = [NSDictionary dictionaryWithObject:[UIColor whiteColor] forKey:NSForegroundColorAttributeName];
    [_NavBar setBackgroundImage:[UIImage imageNamed:@"top_bg"] forBarMetrics:UIBarMetricsDefault];
    _NavBar.topItem.title = @"关于我们";
    
    UIButton *menuBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    menuBtn.frame = CGRectMake(-10, 0, MENU_BUTTON_WIDTH, MENU_BUTTON_HEIGHT);
    [menuBtn setImageWithName:@"btn_menu"];
    [menuBtn addTarget:self action:@selector(onClickMenu:)];
    UIBarButtonItem *leftBarBtnItem = [[UIBarButtonItem alloc]
                                       initWithCustomView:menuBtn];
    _NavBar.topItem.leftBarButtonItem = leftBarBtnItem;
    
    _scrollView.backgroundColor = [UIColor clearColor];
    _scrollView.bounces = YES;
    _scrollView.showsHorizontalScrollIndicator = NO;
    _scrollView.showsVerticalScrollIndicator = NO;
    _scrollView.alwaysBounceVertical = YES;
  
    _deTechLabel.textColor = HEXCOLOR(0x898989);
    _contactUsLabel.textColor = HEXCOLOR(0x898989);
    _firstContentLabel.numberOfLines = 0;
    _firstContentLabel.textColor = HEXCOLOR(0x898989);
    _firstContentLabel.attributedText = [PublicMethod adjustLabel_LineSpacingWithString:@"DE.Tech是一支以交互体验为核心的产品团队，交互设计、动态视觉设计、GUI设计、产品设计是我们的擅长点，多样的客户渠道和深入的行业人脉是我们的资源链，巧妙的跨界整合伴随着我们一直成长，DE.Tech坚信专注于设计品质和交互体验的提升，将会为用户创造出更好的产品服务" ForLineSpacing:1];
    _secondContentLabel.numberOfLines = 0;
    _secondContentLabel.textColor = HEXCOLOR(0x898989);
    _secondContentLabel.attributedText = [PublicMethod adjustLabel_LineSpacingWithString:@"Mail：hi@de-tech.cn\nWeChat：kkkkenneth\nwww.de-tech.cn" ForLineSpacing:1.7];
    
   }
- (void)viewDidAppear:(BOOL)animated
{
    [super viewDidAppear:animated];
    if (isIPhone4) {
        _scrollView.contentSize = CGSizeMake(SCREEN_WIDTH, SCREEN_HEIGHT + 100);
    }else if (isIPhone5){
        _scrollView.contentSize = CGSizeMake(SCREEN_WIDTH, SCREEN_HEIGHT );
    }else{
        _scrollView.contentSize = CGSizeMake(SCREEN_WIDTH, SCREEN_HEIGHT - 44);
    }

}


- (void)onClickMenu:(UIButton *)btn
{
    T4_LOG_FUNC();
    [[SliderViewController sharedSliderController] showLeftViewController];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
